package com.ruoyi.community.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 党员论坛评论的包装对象
 *
 * @author ruoyi
 * @date 2021-12-23
 */
public class CpcBbsCommentPack extends BaseEntity{
    private static final long serialVersionUID = 1L;

    /** 评论id */
    private Long commentId;

    /** 评论者用户id */
    private Long userId;

    /** 评论者用户名 */
    private String userName;

    /** 评论者用户头像 */
    private String userAvatar;

    /** 被回复的评论id */
    private Long parentCommentId;

    /** 被回复的用户名 */
    private String userNameGetReply;

    /** 评论内容 */
    private String content;

    /** 帖子id */
    private Long postId;

    /** 评论时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date syncTime;

    /** 社区id */
    private Long communityId;

    public void initFromCpcComment(CpcBbsComment cpcBbsComment) {
        this.commentId = cpcBbsComment.getCommentId();
        this.parentCommentId = cpcBbsComment.getParentCommentId();
        this.content = cpcBbsComment.getContent();
        this.postId = cpcBbsComment.getPostId();
        this.userId = cpcBbsComment.getUserId();
        this.syncTime = cpcBbsComment.getSyncTime();
        this.commentId = cpcBbsComment.getCommentId();
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Long getCommentId() {
        return commentId;
    }

    public void setCommentId(Long commentId) {
        this.commentId = commentId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserAvatar() {
        return userAvatar;
    }

    public void setUserAvatar(String userAvatar) {
        this.userAvatar = userAvatar;
    }

    public Long getParentCommentId() {
        return parentCommentId;
    }

    public void setParentCommentId(Long parentCommentId) {
        this.parentCommentId = parentCommentId;
    }

    public String getUserNameGetReply() {
        return userNameGetReply;
    }

    public void setUserNameGetReply(String userNameGetReply) {
        this.userNameGetReply = userNameGetReply;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Long getPostId() {
        return postId;
    }

    public void setPostId(Long postId) {
        this.postId = postId;
    }

    public Date getSyncTime() {
        return syncTime;
    }

    public void setSyncTime(Date syncTime) {
        this.syncTime = syncTime;
    }

    public Long getCommunityId() {
        return communityId;
    }

    public void setCommunityId(Long communityId) {
        this.communityId = communityId;
    }

    @Override
    public String toString() {
        return "CpcBbsCommentPack{" +
                "commentId=" + commentId +
                ", userId=" + userId +
                ", userName='" + userName + '\'' +
                ", userAvatar='" + userAvatar + '\'' +
                ", parentCommentId=" + parentCommentId +
                ", userNameGetReply='" + userNameGetReply + '\'' +
                ", content='" + content + '\'' +
                ", postId=" + postId +
                ", syncTime=" + syncTime +
                ", communityId=" + communityId +
                '}';
    }
}
